function ajaxRequestFriendship(friend_id,action){
	var data = {"request[friend_id]" : friend_id,"request[action]" : action};
	var url = urlSendAjax +'RequestFriendship';
    $('#btnNotificationFriendshipDeny'+friend_id).attr("disabled", true);
    $('#btnNotificationFriendshipAccept'+friend_id).attr("disabled", true);

    $.ajax({
        type: 'POST',
        url: url,
        data:data,
        success:function(data){
          	console.log(data);
            $(".divNotificationFriendship"+friend_id).remove();
        },
        error: function(data) {
            console.log('Gửi dữ liệu thất bại.')
        },
        	dataType:'html'
    });
}

function sendRequestFriendship(friend_id){
    var data = {"friend_id" : friend_id};
    var url = urlSendAjax +'SendRequestFriendShip';

    $('#btnSendRequestFriendship'+friend_id).attr("disabled", true);

    $.ajax({
        type: 'POST',
        url: url,
        data:data,
        success:function(data){
            console.log(data);
            $("#divSendRequestFriendship"+friend_id).remove();
        },
        error: function(data) {
            console.log('Gửi dữ liệu thất bại.')
        },
            dataType:'html'
    });
}